home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #1 / Ham Radio 2000.iso / ham2000 / hf / dsp / source / data.lst < prev    next >
Encoding:
File List  |  1991-08-11  |  3.2 KB  |  127 lines

  1.  
  2. Motorola DSP56000 Macro Cross Assembler  Version 2.02  91-08-11  13:24:20  data.asm  Page 1
  3.  
  4.  
  5.  
  6. 1                                  page    132,63,1,1
  7. 2                                  opt     rc
  8. 4      
  9. 5                        ;***************************************************************
  10. 6                        ;* DATA.ASM -- Necessary coefficients for FFT calculation      *
  11. 7                        ;*                                                       *
  12. 8                        ;* Copyright (C) 1991 by Alef Null. All rights reserved.       *
  13. 9                        ;* Author(s): Jarkko Vuori, OH2LNS                           *
  14. 10                       ;* Modification(s):                                        *
  15. 11                       ;***************************************************************
  16. 12     
  17. 13                                 section FFTData
  18. 14                                 xdef    coef,data
  19. 15                                 xdef    samples,window
  20. 16                                 xdef    acca,accb
  21. 17     
  22. 18        00000400       points    equ     1024
  23. 19        3.141593       pi        equ     3.141592654
  24. 20        0.006136       freq      equ     2.0*pi/@cvf(points)
  25. 21     
  26. 22     
  27. 23        X:0000                   org     x:
  28. 24     
  29. 25                       ; SIN coefficients
  30. 26                       coef
  31. 27        00000000       count     set     0
  32. 28                                 dup     points/2
  33. 29   m                             dc      -@cos(@cvf(count)*freq)
  34. 30   m                   count     set     count+1
  35. 31   m                             endm
  36. 1056   
  37. 1057                     ; FFT data
  38. 1058      X:0200 000000  data      ds      points
  39. 1059   
  40. 1060   
  41. 1061      Y:0000                   org     y:
  42. 1062   
  43. 1063                     ; COS coefficients
  44. 1064      00000000       count     set     0
  45. 1065                               dup     points/2
  46. 1066 m                             dc      -@sin(@cvf(count)*freq)
  47. 1067 m                   count     set     count+1
  48. 1068 m                             endm
  49. 2093   
  50. 2094                     ; FFT data
  51. 2095      Y:0200 000000            ds      points
  52. 2096   
  53. 2097   
  54. 2098      P:0000                   org     p:
  55. 2099   
  56. 2100                     ; input sample buffer
  57. 2101      P:0000 000000  samples   ds      points
  58. 2102   
  59. 2103                     ; transform window (Hamming)
  60. 2104                     window
  61. 2105      00000000       count     set     0
  62. 2106                               dup     points
  63.  
  64.  
  65. Motorola DSP56000 Macro Cross Assembler  Version 2.02  91-08-11  13:24:20  data.asm  Page 2
  66. FFT data areas
  67.  
  68.  
  69. 2107 m                             dc      @pow(2,-6)*(0.54-0.46*@cos(2.0*pi*@cvf(count)/@cvf(points)))
  70. 2108 m                   count     set     count+1
  71. 2109 m                             endm
  72. 4158   
  73. 4159                     ; two result accumulators
  74. 4160      P:0800 000000  acca      ds      points/2
  75. 4161      P:0A00 000000  accb      ds      points/2
  76. 4162   
  77. 4163                               endsec
  78. 4164   
  79. 4165                               end
  80. 0    Errors
  81. 0    Warnings
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.